import { exportUrl, getOrderTypeList } from "@/api/materialRequisition/mesMaterialRequisitionDetail"
// 列表头按钮配置
export const operateList = [
  {
    name: $i18n.t("common.export"),
    type: "primary",
    icon: "el-icon-download",
    handleName: "export", //点击时返回的标识
    url: exportUrl
    //auth: "auth:operlog:export", //权限字段
  }
]
// 行末按钮配置
export const rowConfig = [
  {
    name: $i18n.t("common.view"),
    type: "primary",
    class: "row-btn-primary",
    handleName: "show" //点击时返回的标识
  }
]
// 搜索条件配置
export const searchConfig = {
  inline: true,
  formDesc: {
    orderNo: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.orderNo")
    },
    prdOrder: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.productOrderCode2")
    },
    barcode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.barcode")
    },
    goodsCode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.materialCode")
    },
    goodsName: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.materialName")
    }
    // customerCode: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.customerCode"),
    // },
  }
}
// 新增/删除表单配置
export const formDescDialog = {
  span: 24,
  disabled: true,
  isShowSubmitBtn: false,
  formDesc: {
    // warehouseCode: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.warehouseCode"),
    //   layout: 12,
    //   required: false
    // },
    // areaCode: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.areaCode"),
    //   layout: 12,
    //   required: false
    // },
    // locationCode: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.locationCode"),
    //   layout: 12,
    //   required: false
    // },
    orderNo: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.orderNo"),
      layout: 12,
      required: false
    },
    orderType: {
      type: "select",
      label: $i18n.t("mesMaterialRequisitionDetail.orderType"),
      layout: 12,
      required: false,
      prop: {
        value: "value",
        text: "description"
      },
      options: async (data) => {
        const list = await getOrderTypeList()
        return list.data.result
      }
    },

    prdOrder: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.productOrderCode"),
      layout: 12,
      required: false
    },
    // orderLine: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.orderLine"),
    //   layout: 12,
    //   required: false
    // },
    // waveOrderNo: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.waveOrderNo"),
    //   layout: 12,
    //   required: false
    // },
    // waveOrderLine: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.waveOrderLine"),
    //   layout: 12,
    //   required: false
    // },

    goodsCode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.materialCode"),
      layout: 12,
      required: false
    },
    goodsName: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.materialName"),
      layout: 12,
      required: false
    },
    unit: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.measureUnit"),
      layout: 12,
      required: false
    },
    unitCode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.measureUnitCode"),
      layout: 12,
      required: false
    },
    barcode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.barcode"),
      layout: 12,
      required: false
    },
    boxCode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.boxCode"),
      layout: 12,
      required: false
    },
    packageCode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.packageCode"),
      layout: 12,
      required: false
    },


    palletCode: {
      type: "input",
      label: $i18n.t("mesMaterialRequisitionDetail.palletCode"),
      layout: 12,
      required: false
    },
    // amount: {
    //   type: "number",
    //   label: $i18n.t("mesMaterialRequisitionDetail.amount"),
    //   layout: 12,
    //   required: false
    // },
    // customerCode: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.customerCode"),
    //   layout: 12,
    //   required: false
    // },
    // owner: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.owner"),
    //   layout: 12,
    //   required: false
    // },
    // version: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.version"),
    //   layout: 12,
    //   required: false
    // },
    // accountingFlag: {
    //     type: "input",
    //     label: "过账状态 10:未过账 20:过账失败 30:过账成功",
    //     layout:  12,
    //     required: false,
    // },
    // accountingTime: {
    //     type: "datetime",
    //     label: "过账时间",
    //     layout:  12,
    //     required: false,
    //         attrs: {
    //             valueFormat: "yyyy-MM-dd HH:mm:ss",
    //         },
    // },
    // accountingOrder: {
    //     type: "input",
    //     label: "过账凭证号",
    //     layout:  12,
    //     required: false,
    // },
    // accountingMessage: {
    //     type: "input",
    //     label: "过账返回信息",
    //     layout:  12,
    //     required: false,
    // },
    // remark: {
    //   type: "input",
    //   label: $i18n.t("common.remark"),
    //   layout: 12,
    //   required: false
    // },
    // batchNo: {
    //   type: "input",
    //   label: $i18n.t("mesMaterialRequisitionDetail.batchNo"),
    //   layout: 12,
    //   required: false
    // }
  }
}
